package com.javase;

public class FirstJava {
    public static void main(String[] args) {
        /*
        面向对象编程 （object）
         */
        //创建第一个对象cat1
        Cat cat1 = new Cat();
        cat1.name = "小灰";
        cat1.age = 2;
        cat1.color = "灰色";
        //创建第二个对象cat2
        Cat cat2 = new Cat();
        cat2.name = "小白";
        cat2.age = 5;
        cat2.color = "白色";

        System.out.println("第一只猫的信息 "+cat1.name+" "+cat1.age+" "+cat1.color);
        System.out.println("第二只猫的信息 "+cat2.name+" "+cat2.age+" "+cat2.color);
    }
}
class Cat{
    String name;
    int age;
    String color;
}
